function res = fn_norm_2(vx1, vf1, vx2, vf2)

vx = [vx1, vx2];

x1 = vx1(end);
x2 = vx2(end);

xmin = min(x1, x2);
vx(vx>xmin) = [];
vx = sort(vx);

vf1_ins = interp1(vx1, vf1, vx);
vf2_ins = interp1(vx2, vf2, vx);

res = fn_norm(vf1_ins-vf2_ins);

end